package b1.scenes.fight
{
	import b1.net.ResourceHelper;
	import b1.scenes.SceneContainer;
	import b1.conifg.*;
	
	import com.greensock.*;
	
	import flash.display.Sprite;

	public class Arm extends Sprite
	{
		public var index:int;
		
		public function Arm(index:int)
		{
			super();
			this.index = index;
			var objectConfig:ObjectConfig = Config.objectConfigs[index];
			var ArmImg:Class = ResourceHelper.getInstance().getClassByName(objectConfig.iconImage);
			var armImg:Sprite = new ArmImg();
			var diag:Number = Math.sqrt(armImg.width * armImg.width + armImg.height * armImg.height);
			var ratio:Number = 70 / diag;
			armImg.scaleX = ratio;
			armImg.scaleY = ratio;
			addChild(armImg);
			if (index == 24 || index == 25)
			{
				armImg.alpha = 0.5;
			}
		}
	}
}